package com.example.travel.service;


import com.example.travel.bean.ActivityBean;
import com.example.travel.bean.AdminBean;
import com.example.travel.bean.HotelBean;
import com.example.travel.mapper.ActivityMapper;
import com.example.travel.mapper.AdminMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ActivityService {
    @Autowired
    ActivityMapper activityMapper;

    public List<ActivityBean> getActivityList() {
        return activityMapper.getActivityList();
    }

    public int addActivity(ActivityBean activity) {
        return activityMapper.addActivity(activity);
    }

    public int deleteActivity(int activityID) { return activityMapper.deleteActivity(activityID); }

    public int updateActivity(ActivityBean activity) { return activityMapper.updateActivity(activity); }

    public List<ActivityBean> getActivityListWithPagination(String searchKeyword, int offset, int pageSize) {
        return activityMapper.getActivityListWithPagination(searchKeyword, offset, pageSize);
    }

    public int getActivityCount(String searchKeyword) {
        return activityMapper.getActivityCount(searchKeyword);
    }

}
